<div class="p-head">
    <b class="c3">统计</b>
    <div class="r">
        <a href="/bbs/index/3/" class="ajax" title="意见反馈">意见反馈</a>
    </div>
    <div id="desc">
        我的资产状况。。。
    </div>
</div>
<div class="tabs_t tabs_n">
    <ul class="ajax">
        <?php $type = segment(1) ? segment(1) : 'expense' ?>
        <?php foreach ($typelist as $m => $n) { ?>
            <li class="<?= $type == $m ? 'current' : '' ?>"><a href="/statics/<?= $m ?>/"><?= $n ?></a></li>                        
        <?php } ?>
    </ul>
    <span class="r clear">
    </span>
</div>
<div class="tabs_m">
    <table width="100%" border="0" cellpadding="1" cellspacing="1" class="assettable">
        <thead>
            <tr>
                <td width="120" class="center">分类</td>
                <td width="380">类型</td>
                <td>金额</td>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td rowspan="5" class="center border">资产</td>
                <td><span>现金账户</span></td>
                <td><span>￥<?= $show['asset']['cash'] ?></span></td>
            </tr>
            <tr>
                <td><span>银行账户</span></td>
                <td><span>￥<?= sprintf("%.2f", $show['asset']['bank']) ?></span></td>
            </tr>
            <tr>
                <td><span>电子账户</span></td>
                <td><span>￥<?= sprintf("%.2f", $show['asset']['elec']) ?></span></td>
            </tr>
            <tr>
                <td><span>其它账户</span></td>
                <td><span>￥<?= sprintf("%.2f", $show['asset']['other']) ?></span></td>
            </tr>
            <tr>
                <td class="border"><span></span></td>
                <td class="border"><strong class="green">资产合计：￥<?= sprintf("%.2f", $show['asset']['total']) ?></strong></td>
            </tr>
            <tr>
                <td rowspan="3" class="center border">债权</td>
                <td><span>应收款项</span></td>
                <td><span>￥<?= sprintf("%.2f", $show['creditor']['amount']) ?></span> </td>
            </tr>
            <tr>
                <td><span>已收款项</span></td>
                <td><span>￥<?= sprintf("%.2f", $show['creditor']['settled']) ?></span></td>
            </tr>
            <tr>
                <td class="border"><span></span></td>
                <td class="border"><strong class="orange">剩余待收：￥<?= sprintf("%.2f", $show['creditor']['total']) ?></strong></td>
            </tr>
            <tr>
                <td rowspan="4" class="center" bgcolor="ffffff">债务</td>
                <td><span>信用卡欠款</span></td>
                <td><span>￥<?= sprintf("%.2f", -$show['asset']['credit']) ?></span> </td>
            </tr>
            <tr>
                <td><span>应付款项</span></td>
                <td><span>￥<?= sprintf("%.2f", $show['debtor']['amount']) ?></span></td>
            </tr>
            <tr>
                <td><span>已付款项（不计算信用卡还款）</span></td>
                <td><span>￥<?= sprintf("%.2f", $show['debtor']['settled']) ?></span></td>
            </tr>
            <tr>
                <td><span></span></td>
                <td><strong class="red">仍需还款：￥<?= sprintf("%.2f", $show['debtor']['total']) ?></strong></td>
            </tr>
        </tbody>
        <tfoot>
            <tr>
                <td rowspan="3" class="center" bgcolor="ffffff">合计</td>
                <td><span>总资产（资产+债权）</span></td>
                <td><span>￥<?= sprintf("%.2f", $show['asset']['total'] + $show['creditor']['total']) ?></span> </td>
            </tr>
            <tr>
                <td><span>债　务（负债）</span></td>
                <td><span>￥<?= sprintf("%.2f", $show['debtor']['total']) ?></span></td>
            </tr>
            <tr>
                <td><span>净资产（总资产-债务）</span></td>
                <td><span>￥<?= sprintf("%.2f", $show['asset']['total'] + $show['creditor']['total'] - $show['debtor']['total']) ?></span></td>
            </tr>
        </tfoot>
    </table>
</div>
<script type="text/javascript">
    KS.common.load('statistics.asset');
</script>